<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center my_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub my_fd0_0'>
          <view class='flex flex-wrap align-center my_fd0_0_c0'>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

      <view class="flex flex-wrap align-start benben-flex-layout my_flex_1">
        <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
          <view class='flex flex-wrap align-center' v-if="isLogin===true">
            <image class='my_fd1_0_c0_c0' mode="aspectFit" :src='userInfo.avatar'
              @tap.stop="singleImagePreview(userInfo.avatar)"></image>
            <view class='flex flex-direction flex-wrap align-stretch flex-sub my_fd1_0_c0_c1' @tap.stop="handleJumpDiy"
              data-type="navigateTo" :data-url="`/pages/grzx/personalData/personalData`">
              <text class='my_fd1_0_c0_c1_c0'>{{userInfo.nickname}}</text>
              <view class='flex flex-wrap align-center my_fd1_0_c0_c1_c1'>
                <!-- <text class='my_fd1_0_c0_c1_c1_c0'>邀请码：</text> -->
                <text class='my_fd1_0_c0_c1_c1_c0'>{{userInfo._mobile}}</text>
                <!-- <text class='my_fd1_0_c0_c1_c1_c2' @tap.stop="copyText(userInfo.invite_code)">复制</text> -->
              </view>
            </view>
            <image class='my_fd1_0_c0_c2' mode="aspectFit" :src='STATIC_URL+"29.png"' @tap.stop="handleJumpDiy"
              data-type="navigateTo" :data-url="`/pages/grzx/personalData/personalData`"></image>
          </view>
          <view class='flex flex-wrap align-center' @tap.stop="toLoginDiy()" v-if="isLogin===false">
            <image class='my_fd1_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"5.png"'></image>
            <view class='flex flex-direction flex-wrap align-stretch flex-sub my_fd1_0_c0_c1'>
              <view class='flex flex-wrap align-center'>
                <text class='my_fd1_0_c1_c1_c0_c0'>请登录</text>
              </view>
            </view>
          </view>

        </view>
      </view>


      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center">
        <view class='flex flex-direction flex-wrap align-stretch flex-sub my_fd2_0'>
          <view class='flex flex-direction flex-wrap align-stretch flex-sub my_fd2_0_c0'>
            <view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/grzx/kaoqinjilu/kaoqinjilu`">
              <image class='my_fd2_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"30.png"'></image>
              <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c0_c0_c1'>
                <text class='my_fd2_0_c0_c0_c1_c0'>考勤记录</text>
                <image class='my_fd2_0_c0_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center'>
              <image class='my_fd2_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"31.png"'></image>
              <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c0_c0_c1'>
                <text class='my_fd2_0_c0_c0_c1_c0'>我的企业</text>
                <text class='my_fd2_0_c0_c1_c1_c1' v-if="isLogin">{{userInfo.company}}</text>
              </view>
            </view>
            <view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/xtsz/changePwdPhoneCode/changePwdPhoneCode`">
              <image class='my_fd2_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"72.png"'></image>
              <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c0_c0_c1'>
                <text class='my_fd2_0_c0_c0_c1_c0'>修改密码</text>
                <image class='my_fd2_0_c0_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/xtsz/woyoujianyi/woyoujianyi`">
              <image class='my_fd2_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"33.png"'></image>
              <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c0_c0_c1'>
                <text class='my_fd2_0_c0_c0_c1_c0'>意见反馈</text>
                <image class='my_fd2_0_c0_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center' @tap.stop="popupShow1713777448766=true">
              <image class='my_fd2_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"148.png"'></image>
              <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c0_c0_c1'>
                <text class='my_fd2_0_c0_c0_c1_c0'>联系我们</text>
                <view class='flex flex-wrap align-center self-center'>
                  <text class='my_fd2_0_c0_c4_c1_c1_c0'>{{tel}}</text>
                  <image class='my_fd2_0_c0_c4_c1_c1_c1' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
                </view>
              </view>
            </view>
            <view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/dlzc/agreements1713771335/agreements1713771335`">
              <image class='my_fd2_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"149.png"'></image>
              <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c0_c0_c1'>
                <text class='my_fd2_0_c0_c0_c1_c0'>用户协议</text>
                <image class='my_fd2_0_c0_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/dlzc/privacyPolicy1713771334/privacyPolicy1713771334`">
              <image class='my_fd2_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"150.png"'></image>
              <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c0_c6_c1'>
                <text class='my_fd2_0_c0_c0_c1_c0'>隐私协议</text>
                <image class='my_fd2_0_c0_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
              </view>
            </view>
          </view>
          <button class='my_fd2_0_c1' v-if="isLogin" @tap.stop="popupShow1713777487744=true">退出登录</button>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <benben-popup v-model="popupShow1713777448766" :mask="true" :mask-close-able="true" mode='bottom' :z-index='999'>
        <!---flex布局flex布局开始-->
        <view class="flex flex-direction align-stretch benben-flex-layout my_flex_3">
          <view class='flex flex-wrap align-center self-center justify-center flex-sub my_fd3_0'
            @click.stop="callMobile(tel)">
            <image class='my_fd3_0_c0' mode="aspectFit" :src='STATIC_URL+"151.png"'></image>
            <text class='my_fd3_0_c1'>{{tel}}</text>
          </view>

          <view class='flex  my_fd3_1'></view>

          <view class='flex flex-wrap align-center self-center justify-center flex-sub my_fd3_0'
            @click.stop="popupShow1713777448766=false">
            <text class='my_fd3_2_c0'>取消</text>
          </view>
        </view>

        <!---flex布局flex布局结束-->

      </benben-popup>
      <benben-popup v-model="popupShow1713777487744" :mask="true" :mask-close-able="false" mode='center' :z-index='999'>
        <!---删除弹窗flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center my_flex_4">
          <text class='my_fd4_0'>提示</text>
          <text class='my_fd4_1'>确定退出当前账号？</text>
          <view class='flex flex-wrap align-center my_fd4_2'>
            <button class='my_fd4_2_c0' @tap.stop="popupShow1713777487744=false">取消</button>
            <button class='my_fd4_2_c1' @tap.stop="logOutFunc()">确认</button>
          </view>
        </view>

        <!---删除弹窗flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "popupShow1713777487744": false,
        "popupShow1713777448766": false,
        "userInfo": {
          "invite_code": "",
          "address": "",
          "address_code": "",
          "hobby": "",
          "tags": "",
          "id": "",
          "userlevel_id": "",
          "mobile": "",
          "real_name": "",
          "avatar": "",
          "account": "",
          "email": "",
          "birthday": "",
          "gender": "",
          "create_time": "",
          "user_money": "",
          "freeze_money": "",
          "total_consumption_money": "",
          "score": "",
          "_mobile": "",
          "coupon": "",
          "collection_count": "",
          "browse_count": "",
          "total_money": "",
          "certified": "",
          "nickname": "",
          "is_pay_password": "",
          "follow_count": "",
          "is_close": ""
        },
        "subscripts": {
          "article": "",
          "message": "",
          "chat": "",
          "all": ""
        },
        tel: ''
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      isLogin() {
        return this.$store.state.token == '' ? false : true;
      }
    },
    watch: {},
    onLoad(options) {
      this.getCact()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.queryUserInfoFunc()
    },
    onHide() {
      this.popupShow1713777448766 = false
    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      getCact() {
        this.$api.post(global.apiUrls.post64cdb895b79ba).then(res => {
          if (res.data.code == 1) {
            this.tel = res.data.data.tel
          }
        })
      },
      //获取用户详细信息
      async queryUserInfoFunc() {
        if (this.isLogin === true) {
          //请求方法
          //数据验证

          let datauserInfo = await this.$api.get(global.apiUrls.post5c78c4772da97, {

          });

          if (datauserInfo.data.code != 1) {
            this.$message.info(datauserInfo.data.msg);
            return
          }
          let infouserInfo = datauserInfo.data;
          this.userInfo = infouserInfo.data

        }
      },
      //logOut
      logOutFunc() {
        this.$store.commit('logout')
        this.popupShow1713777487744 = false;
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('36.png')) no-repeat;
    background-size: 100% auto;
  }

  .my_flex_0 {
    background: url(image-path('36.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .my_fd0_0_c0 {
    width: 200rpx;
  }

  .my_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .my_flex_1 {
    padding: 24rpx 32rpx 30rpx 32rpx;
  }

  .my_fd1_0_c1_c1_c0_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #FFFFFF;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .my_fd1_0_c0_c2 {
    width: 14rpx;
    height: 26rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .my_fd1_0_c0_c1_c1_c2 {
    background: rgba(253, 118, 112, 1);
    font-size: 24rpx;
    font-weight: 500;
    color: var(--benbenFontColor3);
    border-radius: 6rpx 6rpx 6rpx 6rpx;
    padding: 2rpx 8rpx 2rpx 8rpx;
    margin: 0rpx 0rpx 0rpx 6rpx;
  }

  .my_fd1_0_c0_c1_c1_c0 {
    font-size: 24rpx;
    font-weight: 500;
    color: var(--benbenFontColor3);
  }

  .my_fd1_0_c0_c1_c1 {
    margin: 8rpx 0rpx 0rpx 0rpx;
  }

  .my_fd1_0_c0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #FFFFFF;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    margin: 0rpx 0rpx 20rpx 0rpx;
  }

  .my_fd1_0_c0_c1 {
    margin: 0rpx 0rpx 0rpx 20rpx;
  }

  .my_fd1_0_c0_c0 {
    width: 128rpx;
    height: 128rpx;
    border-radius: 66rpx 66rpx 66rpx 66rpx;
  }

  .my_fd2_0_c1 {
    border: 1px solid #0077FF;
    background: rgba(0, 119, 255, 0.08);
    border-radius: 64rpx 64rpx 64rpx 64rpx;
    width: 686rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: rgba(0, 137, 255, 1);
    height: 88rpx;
    margin: 50rpx auto 0rpx auto;
  }

  .my_fd2_0_c0_c6_c1 {
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .my_fd2_0_c0_c4_c1_c1_c1 {
    width: 14rpx;
    height: 26rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 0rpx 0rpx 0rpx;
  }

  .my_fd2_0_c0_c4_c1_c1_c0 {
    margin: 0rpx 12rpx 0rpx 0rpx;
    font-size: 32rpx;
    color: rgba(102, 102, 102, 1);
  }

  .my_fd2_0_c0_c1_c1_c1 {
    font-size: 32rpx;
  }

  .my_fd2_0_c0_c0_c1_c1 {
    width: 14rpx;
    height: 26rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .my_fd2_0_c0_c0_c1_c0 {
    margin: 0rpx 16rpx 0rpx 16rpx;
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
  }

  .my_fd2_0_c0_c0_c1 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .my_fd2_0_c0_c0_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .my_fd2_0_c0 {
    background: var(--benbenbgColor1);
    margin: 24rpx 0rpx 24rpx 0rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    background-size: 100% auto !important;
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .my_fd2_0 {
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .my_flex_3 {
    background: var(--benbenbgColor1);
    background-size: 100% auto;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
  }

  .my_fd3_2_c0 {
    font-size: 32rpx;
    color: var(--benbenFontColor2);
  }

  .my_fd3_1 {
    background: rgba(248, 248, 248, 1);
    width: 100%;
    height: 20rpx;
    margin: 10rpx 0rpx 10rpx 0rpx;
  }

  .my_fd3_0_c1 {
    font-size: 32rpx;
  }

  .my_fd3_0_c0 {
    width: 32rpx;
    height: 32rpx;
    margin: 0rpx 12rpx 0rpx 0rpx;
  }

  .my_fd3_0 {
    line-height: 100rpx;
  }

  .my_flex_4 {
    background: #fff;
    width: 540rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .my_fd4_2_c1 {
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 16rpx 0rpx;
    font-size: 32rpx;
    color: rgba(0, 137, 255, 1);
    font-weight: 500;
    width: 270rpx;
  }

  .my_fd4_2_c0 {
    border-top: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 0rpx 16rpx;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    font-weight: 500;
    width: 270rpx;
  }

  .my_fd4_2 {
    margin: 37rpx 0rpx 0rpx 0rpx;
  }

  .my_fd4_1 {
    line-height: 52rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 32rpx 0rpx 32rpx;
    text-align: center;
  }

  .my_fd4_0 {
    font-size: 36rpx;
    font-weight: 700;
    line-height: 32rpx;
    color: #333333;
    margin: 40rpx 0rpx 40rpx 0rpx;
  }
</style>
